<?php
class Admin_Form_Site extends Zend_Form{
	public function init(){
		$this->setAttrib('id', 'frmAdminForm');
		
		$site_name = $this->createElement('text', 'site_name');
		
		$site_title = $this->createElement('text', 'site_title');
		$site_title->setLabel('Tiêu đề trang');
		$site_title->setRequired(true);		
		
		
		$site_icon = $this->createElement('image', 'site_icon');
		$site_icon->setLabel('Icon hiện tại');
		$site_icon->setAttrib('onclick', 'javascript: return false;');
		$site_logo = $this->createElement('image', 'site_logo');
		
		$site_logo->setLabel('Logo hiện tại');
		$site_logo->setAttrib('onclick', 'javascript: return false;');
		
		$file_icon = $this->createElement('file', 'file_icon')->setLabel('Chọn icon đại diện');
		$file_icon->setDestination(PUBLIC_PATH.'/uploads/images/setting');
		$file_icon->setAttrib('class', 'file');
		
		$file_logo = $this->createElement('file','file_logo')->setLabel('Chọn Logo đại diện');
		$file_logo->setDestination(PUBLIC_PATH.'/uploads/images/setting');
		$file_logo->setAttrib('class', 'file');
		
		$site_description = $this->createElement('text', 'site_description')
			->setLabel('Mô tả web')
		;
		$this->addElements(array(
				//$site_name,
				$site_title,
				$file_icon,
				$site_icon,
				$file_logo,
				$site_logo,
				$site_description
		));
		
		$this->addDisplayGroup(array(
				//$site_name,
				$site_title,
				$file_icon,
				$site_icon,
				$file_logo,
				$site_logo,
				$site_description
				
		), 'basic-info',array('legend'=>'Cài đặt website','class'=>'display-group'));
	}
}